using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using APPro.Entities;

/// <summary>
/// Summary description for WebSession
/// </summary>
public class WebSession
{
    public static void Destroy(string sessionKey)
    {
        HttpContext.Current.Session[sessionKey] = null;
    }

    public static User OnlineUser
    {
        set
        {
            HttpContext.Current.Session["onlineUser"] = value;
        }
        get
        {
            if (HttpContext.Current.Session != null)
            {
                return (User)HttpContext.Current.Session["onlineUser"];
            }
            return null;
        }
    }
}
